﻿#ifndef FRAMELESSHELPER_H
#define FRAMELESSHELPER_H

#include <QObject>
#include <QWidget>



class QWidget;
struct FrameLessHelperPrivate;


class FrameLessHelper : public QObject
{
    Q_OBJECT
public:
    explicit FrameLessHelper(QObject *parent = nullptr);
    ~FrameLessHelper();

    void activateOn(QWidget *topLevelWidget);

    void removeFrom(QWidget *topLevelWidget);

    void setWidgetMovable(bool movable);

    void setWidgetResizable(bool resizable);

    void setRubberBandOnMove(bool movable);

    void setRubberBandOnResize(bool resizable);

    void setBorderWidth(uint width);

    void setTitleHeight(uint height);

    bool getWidgetResizable();
    bool getWidgetMovable();
    bool getRubberBandOnMove();
    bool getRubberBandOnResisze();
    uint getBorderWidth();
    uint getTitleHeight();

protected:
    virtual bool eventFilter(QObject *watched, QEvent *event);

signals:

public slots:

private:
    FrameLessHelperPrivate* d;
};

#endif // FRAMELESSHELPER_H
